package enumerator;

enum CoffeeSize {
	// 8, 10, & 16 are passed to the constructor
	BIG(8, "A"), HUGE(10, "B"), OVERWHELMING(16, "C");
	
	CoffeeSize(int ounces, String lid) { // constructor
		this.ounces = ounces;
		this.lid = lid;
	}
	
	private int ounces;	// an instance variable
	private String lid; // an instance variable
	
	public int getOunces() {
		return ounces;
	}
	public String getLid() {
		return lid;
	}
}

public class Coffee { 
	CoffeeSize size; // each instance of Coffee has an enum
	
	public static void main (String[] args) {
		Coffee drink1 = new Coffee();
		drink1.size = CoffeeSize.BIG;
		
		Coffee drink2 = new Coffee();
		drink2.size = CoffeeSize.OVERWHELMING;
		
		//System.out.println(drink1.size.getOunces());	// print 8
		
		for (CoffeeSize cs: CoffeeSize.values())
			System.out.println(cs + " " + cs.getOunces() + " " + cs.getLid());
	}
}
 